<div class="row m-n">
	<div class="crumbs-bar">
		<div yb-crumbs></div>
	</div>
	<div tabset type="tab">
		<div tab heading="价格方案变动预警" active="activeFlag[0]" ng-click="changeTab(0)">
			<div class="row wrapper-y-sm">
				<div class="operate-bar col-xs-4 font-0">
					<button class="btn btn-operate m-r-sm" ng-click="updatePricewarnBatch()" ng-disabled="!btnPermission.priceSchemeWarn">批量维护价格方案说明</button>
					<button class="btn btn-operate m-r-sm" ng-click="addPricewarn()"
						ng-disabled="!btnPermission.priceSchemeWarnToDbd">生成督办单</button>
				</div>
				<div class="search-bar wrapper-none col-xs-8">
					<div class="btn-group m-l-xs pull-right">
						<button type="button" class="btn btn-default base-color" ng-click="search()" title="刷新">
							<i class="yb-icon ico-refresh"></i>
						</button>
						<button type="button" class="btn btn-default base-color" title="配置表格列"
							ng-click="switchToolbar('ColConfig');">
							<i class="yb-icon ico-set"></i>
						</button>
						<div class="btn btn-default base-color" ng-if="btnPermission.priceSchemeWarnExport">
							<div title="导出" yb-download download-url="exportParam.allUrl" download-param="condition"
								is-ajax="true">
								<i class="yb-icon ico-export-o"></i>
							</div>
						</div>
					</div>
					<button class="btn-advance pull-right m-l-xs" ng-click="switchToolbar('AdvanceSearch')">高级搜索</button>
					<div class="input-group pull-right clearfix">
						<input type="text" ng-if="subTabFlag[0]" class="form-control txt-search"
							placeholder="{{placeholder}}" ng-model="condition.keyWords">
						<input type="text" ng-if="subTabFlag[1]" class="form-control txt-search"
							placeholder="{{placeholder}}" ng-model="conditionMateriel.keyWords">
						<span class="input-group-addon cursor-pointer" ng-click="search(1)">搜索</span>
					</div>
				</div>
				<!--客户高级搜索-->
				<div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)"
					reset-data="reset()">
					<div class="advance-search m-t-sm">
						<div class="form-group clearfix">
							<label class="control-label"><span>客户编码</span>：</label>
							<textarea ng-model="condition.materialsNos" class="form-control" ng-blur="handleMultiInput($event)"
								placeholder="逗号分隔或者换行分隔"></textarea>
						</div>
						<div class="form-group clearfix">
							<label class="control-label"><span>单据状态</span>：</label>
							<select class="form-control" ng-model="condition.status">
								<option value="">请选择</option>
								<option value="0">未完成</option>
								<option value="1">已完成</option>
							</select>
						</div>
					</div>
				</div>
				<!--零件编号高级搜索-->
				<div yb-advance-search show-toolbar="toolbarConfigMateriel.showAdvanceSearch" search-data="search(1)"
					reset-data="reset2()">
					<div class="advance-search m-t-sm">
						<div class="form-group clearfix">
							<label class="control-label"><span>零件编号</span>：</label>
							<textarea ng-model="conditionMateriel.materialsNos" class="form-control"
								ng-blur="handleMaterielMultiInput($event)" placeholder="逗号分隔或者换行分隔"></textarea>
						</div>
						<div class="form-group clearfix">
							<label class="control-label"><span>单据状态</span>：</label>
							<select class="form-control" ng-model="conditionMateriel.status">
								<option value="">请选择</option>
								<option value="0">未完成</option>
								<option value="1">已完成</option>
							</select>
						</div>
					</div>
				</div>


			</div>
			<div yb-col-config show-toolbar="toolbarConfig.showColConfig" ng-model="tableConfig" col-fixed="false"
				has-check-col="true"></div>
			<div yb-col-config show-toolbar="toolbarConfigMateriel.showColConfig" ng-model="tableConfigMateriel"
				col-fixed="false" has-check-col="true"></div>
			<div class="main-area">

				<div tabset type="sub-tab">
					<div tab heading="客户" active="subTabFlag[0]" ng-click="changeSubTab(0)">
						<div class="main-area d-b-60" style=" top:50px">
							<div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
								<div class="th-fixed">
									<table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
										<thead>
											<tr>
												<th width="40" class="text-center th-check border-l-none">
													<div yb-check-box yb-checked="markInfo.allChecked" yb-click="selectAll(dataList)"></div>
												</th>
												<th ng-repeat="itemCol in tableConfig.tableCol track by $index"
													ng-show="!!itemCol.isShow && !!itemCol.isFixed" width="{{itemCol.width}}">
													<div yb-thead-operate ng-model="itemCol" target-width="tableConfig.fixedWidth"
														fixed-width="tbStyle.scrollLeft"></div>
												</th>
											</tr>
										</thead>
									</table>
								</div>
								<div class="th-scroll-x" ng-style="tbStyle.scrollLeft">
									<table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
										<thead>
											<tr>
												<th ng-repeat="itemCol in tableConfig.tableCol track by $index"
													ng-show="!!itemCol.isShow && !itemCol.isFixed" width="{{itemCol.width}}">
													<div yb-thead-operate ng-model="itemCol" target-width="tableConfig.scrollWidth">
													</div>
												</th>
											</tr>
										</thead>
									</table>
								</div>
								<div class="td-scroll-y" ng-show="dataList.length > 0">
									<table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
										<tbody>
											<tr ng-repeat="item in dataList track by $index"
												ng-class="{'row-selected': $index === markInfo.curRow}" ng-click="selectRow($index)">
												<td width="40" class="text-center border-l-none">
													<div yb-check-box yb-checked="item.isChecked" yb-click="selectSingle(item, dataList)"></div>
												</td>
												<td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index"
													width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
													title="{{item[itemCol.dataField]}}">
													<div>
														<button type="button" class="btn btn-operate m-r-xs" ng-disabled="item.status==1||!btnPermission.priceSchemeWarn"
																title="{{!btnPermission.priceSchemeWarn?'无权限执行此操作':''}}"
															ng-click="updatePricewarn(item)">编辑</button>
													</div>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
								<div class="td-scroll" ng-show="dataList.length > 0" ng-style="tbStyle.scrollLeft">
									<table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
										<tbody>
											<tr ng-repeat="item in dataList track by $index"
												ng-class="{'row-selected': $index === markInfo.curRow}" ng-click="selectRow($index)">
												<td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index"
													width="{{itemCol.width}}" title="{{item[itemCol.dataField]}}"
													ng-class="{'success-color':item.jackCon==2,'danger-color':item.jackCon==1}"
													ng-show="!!itemCol.isShow && !itemCol.isFixed">
													<div ng-switch="itemCol.type">
														<div ng-switch-when="click">
															<a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)">
																{{item[itemCol.dataField]}}
															</a>
														</div>
														<div ng-switch-default class="spill-dots">
															<span>{{item[itemCol.dataField]}}</span>
														</div>
													</div>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
								<div class="no-data w-full text-center p-t" ng-show="dataList.length === 0" translate>
									暂时没有数据</div>
							</div>
						</div>

						<div class="bottom-area page-bar wrapper-y-sm clearfix">
							<div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
						</div>
					</div>
					<div tab heading="零件" active="subTabFlag[1]" ng-click="changeSubTab(1)">
						<div class="main-area d-b-60" style=" top:50px">
							<div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
								<div class="th-fixed">
									<table class="table-fixed border-none" width="{{tableConfigMateriel.fixedWidth}}">
										<thead>
											<tr>
												<th width="40" class="text-center th-check border-l-none">
													<div yb-check-box yb-checked="markInfo.allChecked" yb-click="selectAll(dataListMateriel)">
													</div>
												</th>
												<th ng-repeat="itemCol in tableConfigMateriel.tableCol track by $index"
													ng-show="!!itemCol.isShow && !!itemCol.isFixed" width="{{itemCol.width}}">
													<div yb-thead-operate ng-model="itemCol" target-width="tableConfigMateriel.fixedWidth"
														fixed-width="tbStyle.scrollLeft"></div>
												</th>
											</tr>
										</thead>
									</table>
								</div>
								<div class="th-scroll-x" ng-style="tbStyle.scrollLeft">
									<table class="table-fixed border-none" width="{{tableConfigMateriel.scrollWidth}}">
										<thead>
											<tr>
												<th ng-repeat="itemCol in tableConfigMateriel.tableCol track by $index"
													ng-show="!!itemCol.isShow && !itemCol.isFixed" width="{{itemCol.width}}">
													<div yb-thead-operate ng-model="itemCol" target-width="tableConfigMateriel.scrollWidth">
													</div>
												</th>
											</tr>
										</thead>
									</table>
								</div>
								<div class="td-scroll-y" ng-show="dataListMateriel.length > 0">
									<table class="table-fixed border-none" width="{{tableConfigMateriel.fixedWidth}}">
										<tbody>
											<tr ng-repeat="item in dataListMateriel track by $index"
												ng-class="{'row-selected': $index === markInfo.curRow}" ng-click="selectRow($index)">
												<td width="40" class="text-center border-l-none">
													<div yb-check-box yb-checked="item.isChecked" yb-click="selectSingle(item, dataListMateriel)">
													</div>
												</td>
												<td class="spill-dots" ng-repeat="itemCol in tableConfigMateriel.tableCol track by $index"
													width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
													title="{{item[itemCol.dataField]}}">
													<div>
														<button type="button" class="btn btn-operate m-r-xs"  
														ng-disabled="!btnPermission.priceSchemeWarn||item.status==1" title="{{!btnPermission.priceSchemeWarn?'无权限执行此操作':''}}"
															ng-click="updatePricewarn(item)">编辑</button>
															
													</div>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
								<div class="td-scroll" ng-show="dataListMateriel.length > 0" ng-style="tbStyle.scrollLeft">
									<table class="table-fixed border-none" width="{{tableConfigMateriel.scrollWidth}}">
										<tbody>
											<tr ng-repeat="item in dataListMateriel track by $index"
												ng-class="{'row-selected': $index === markInfo.curRow}" ng-click="selectRow($index)">
												<td class="spill-dots" ng-repeat="itemCol in tableConfigMateriel.tableCol track by $index"
													width="{{itemCol.width}}" title="{{item[itemCol.dataField]}}"
													ng-class="{'success-color':item.jackCon==2,'danger-color':item.jackCon==1}"
													ng-show="!!itemCol.isShow && !itemCol.isFixed">
													<div ng-switch="itemCol.type">
														<div ng-switch-when="click">
															<a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)">
																{{item[itemCol.dataField]}}
															</a>
														</div>
														<div ng-switch-default class="spill-dots">
															<span>{{item[itemCol.dataField]}}</span>
														</div>
													</div>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
								<div class="no-data w-full text-center p-t" ng-show="dataListMateriel.length === 0" translate>
									暂时没有数据</div>
							</div>
						</div>

						<div class="bottom-area page-bar wrapper-y-sm clearfix">
							<div yb-page-info ng-model="pageInfoMateriel" yb-refresh="search()"></div>
						</div>

					</div>
				</div>
			</div>
		</div>
		<div tab heading="价格方案(类型)图表-时间" active="activeFlag[1]" ng-click="changeTab(1)">
			<div ng-if="activeFlag[1]">
				<form name="checkForm" class="m-t-lg form-horizontal form-up-tb clearfix">
					<div class="form-group col-xs-3 m-b-sm">
						<label class="col-xs-4 control-label max-w-100"><i>*</i><span translate>更新时间起始</span>：</label>
						<div class="col-xs-8 wrapper-none">
							<input type="text" class="form-control date-picker" name="adjustDateStart" required
								ng-model="echartsCondition1.queryStartDate" datepicker-popup="{{'yyyy-MM-dd'}}" modal-size="small"
								is-open="adjustDateStartShow" close-text="关闭" readonly
								ng-change="checkDate(echartsCondition1, 'queryStartDate', 'queryEndDate')"
								ng-click="adjustDateEndShow=false;adjustDateStartShow=!adjustDateStartShow">

							<div class="msg-block" ng-show="checkForm.adjustDateStart.$invalid && submitted">
								<div class="error-msg"
									ng-if="checkForm.adjustDateStart.$error.required && !checkForm.adjustDateStart.focused">
									<div class="msg-triangle"></div>
									<span translate>必填项，请填写</span>
								</div>
							</div>
						</div>
					</div>
					<div class="form-group col-xs-3 m-b-sm">
						<label class="col-xs-4 control-label max-w-100"><i>*</i><span translate>更新时间截止</span>：</label>
						<div class="col-xs-8 wrapper-none">
							<input type="text" class="form-control date-picker" name="adjustDateEnd" required
								ng-model="echartsCondition1.queryEndDate" datepicker-popup="{{'yyyy-MM-dd'}}" modal-size="small"
								is-open="adjustDateEndShow" close-text="关闭" readonly
								ng-change="checkDate(echartsCondition1, 'queryStartDate', 'queryEndDate')"
								ng-click="adjustDateStartShow=false;adjustDateEndShow=!adjustDateEndShow">

							<div class="msg-block" ng-show="checkForm.adjustDateEnd.$invalid && submitted">
								<div class="error-msg"
									ng-if="checkForm.adjustDateEnd.$error.required && !checkForm.adjustDateEnd.focused">
									<div class="msg-triangle"></div>
									<span translate>必填项，请填写</span>
								</div>
							</div>
						</div>
					</div>
					<div class="form-group col-xs-3 m-b-sm">
						<span class="btn btn-primary searchBtn" ng-click="echartsSearch1(checkForm.$valid)">搜索</span>
					</div>
				</form>
				<div yb-bar-chart class="chart-wrap m-t-lg" chart-axis="echartsOption1" xaxis-title="时间" style="height:400px;"></div>
			</div>
		</div>
		<div tab heading="价格方案(类型)图表-客户" active="activeFlag[2]" ng-click="changeTab(2)">
			<div ng-if="activeFlag[2]">
				<form name="checkForm" class="m-t-lg form-horizontal form-up-tb clearfix">
					<div class="form-group col-xs-3 m-b-sm">
						<label class="col-xs-4 control-label max-w-100"><i>*</i><span translate>更新时间起始</span>：</label>
						<div class="col-xs-8 wrapper-none">
							<input type="text" class="form-control date-picker" name="adjustDateStart" required
								ng-model="echartsCondition2.queryStartDate" datepicker-popup="{{'yyyy-MM-dd'}}" modal-size="small"
								is-open="adjustDateStartShow" close-text="关闭" readonly
								ng-change="checkDate(echartsCondition2, 'queryStartDate', 'queryEndDate')"
								ng-click="adjustDateEndShow=false;adjustDateStartShow=!adjustDateStartShow">

							<div class="msg-block" ng-show="checkForm.adjustDateStart.$invalid && submitted">
								<div class="error-msg"
									ng-if="checkForm.adjustDateStart.$error.required && !checkForm.adjustDateStart.focused">
									<div class="msg-triangle"></div>
									<span translate>必填项，请填写</span>
								</div>
							</div>
						</div>
					</div>
					<div class="form-group col-xs-3 m-b-sm">
						<label class="col-xs-4 control-label max-w-100"><i>*</i><span translate>更新时间截止</span>：</label>
						<div class="col-xs-8 wrapper-none">
							<input type="text" class="form-control date-picker" name="adjustDateEnd" required
								ng-model="echartsCondition2.queryEndDate" datepicker-popup="{{'yyyy-MM-dd'}}" modal-size="small"
								is-open="adjustDateEndShow" close-text="关闭" readonly
								ng-change="checkDate(echartsCondition2, 'queryStartDate', 'queryEndDate')"
								ng-click="adjustDateStartShow=false;adjustDateEndShow=!adjustDateEndShow">

							<div class="msg-block" ng-show="checkForm.adjustDateEnd.$invalid && submitted">
								<div class="error-msg"
									ng-if="checkForm.adjustDateEnd.$error.required && !checkForm.adjustDateEnd.focused">
									<div class="msg-triangle"></div>
									<span translate>必填项，请填写</span>
								</div>
							</div>
						</div>
					</div>
					<div class="form-group col-xs-3 m-b-sm">
						<span class="btn btn-primary searchBtn" ng-click="echartsSearch2(checkForm.$valid)">搜索</span>
					</div>
				</form>
				<div yb-bar-chart class="chart-wrap m-t-lg" chart-axis="echartsOption2" xaxis-title="客户名称" style="height:400px;"></div>
			</div>
		</div>
		<div tab heading="价格方案(零件)图表-时间" active="activeFlag[3]" ng-click="changeTab(3)">
			<div ng-if="activeFlag[3]">
				<form name="checkForm" class="m-t-lg form-horizontal form-up-tb clearfix">
					<div class="form-group col-xs-3 m-b-sm">
						<label class="col-xs-4 control-label max-w-100"><i>*</i><span translate>更新时间起始</span>：</label>
						<div class="col-xs-8 wrapper-none">
							<input type="text" class="form-control date-picker" name="adjustDateStart" required
								ng-model="echartsCondition3.queryStartDate" datepicker-popup="{{'yyyy-MM-dd'}}" modal-size="small"
								is-open="adjustDateStartShow" close-text="关闭" readonly
								ng-change="checkDate(echartsCondition3, 'queryStartDate', 'queryEndDate')"
								ng-click="adjustDateEndShow=false;adjustDateStartShow=!adjustDateStartShow">

							<div class="msg-block" ng-show="checkForm.adjustDateStart.$invalid && submitted">
								<div class="error-msg"
									ng-if="checkForm.adjustDateStart.$error.required && !checkForm.adjustDateStart.focused">
									<div class="msg-triangle"></div>
									<span translate>必填项，请填写</span>
								</div>
							</div>
						</div>
					</div>
					<div class="form-group col-xs-3 m-b-sm">
						<label class="col-xs-4 control-label max-w-100"><i>*</i><span translate>更新时间截止</span>：</label>
						<div class="col-xs-8 wrapper-none">
							<input type="text" class="form-control date-picker" name="adjustDateEnd" required
								ng-model="echartsCondition3.queryEndDate" datepicker-popup="{{'yyyy-MM-dd'}}" modal-size="small"
								is-open="adjustDateEndShow" close-text="关闭" readonly
								ng-change="checkDate(echartsCondition3, 'queryStartDate', 'queryEndDate')"
								ng-click="adjustDateStartShow=false;adjustDateEndShow=!adjustDateEndShow">

							<div class="msg-block" ng-show="checkForm.adjustDateEnd.$invalid && submitted">
								<div class="error-msg"
									ng-if="checkForm.adjustDateEnd.$error.required && !checkForm.adjustDateEnd.focused">
									<div class="msg-triangle"></div>
									<span translate>必填项，请填写</span>
								</div>
							</div>
						</div>
					</div>
					<div class="form-group col-xs-3 m-b-sm">
						<span class="btn btn-primary searchBtn" ng-click="echartsSearch3(checkForm.$valid)">搜索</span>
					</div>
				</form>
				<div yb-bar-chart class="chart-wrap m-t-lg" chart-axis="echartsOption3" xaxis-title="时间" style="height:400px;"></div>
			</div>
		</div>
		<div tab heading="预警条件" active="activeFlag[4]" ng-click="changeTab(4)">
			<div class="p-t-md corr-tips">
				当对价格方案的客户和零件进行修改维护操作时，将业务数据自动生成到价格方案变更预警功能界面。
			</div>
		</div>
	</div>
</div>
